
var clientW = document.documentElement.clientWidth || document.body.clientWidth;
if (clientW) {
    document.documentElement.style.fontSize = 100 * (clientW / 750.1) + 'px';
}
(function(doc, win) {
    //var html = doc.getElementsByTagName("html")[0],
    var docEls = doc.documentElement,
        // orientationchange->手机屏幕转屏事件
        // resize->页面大小改变事件(一边pc端有用)

        reEvt = "orientationchange" in win ? "orientationchange" : "resize",

        reFontSize = function() {
            var clientW = doc.documentElement.clientWidth || doc.body.clientWidth;
            if (!clientW) {
                location.reload()
                return;
            }
            document.body.style.display = "none";
            docEls.style.fontSize = 100 * (clientW / 1920.1) + 'px';
            //html.style.fontSize = 10 * (clientW / 1920) + "px";
            document.body.style.display = "block";
        }
    if (!doc.addEventListener) return;
    win.addEventListener(reEvt, reFontSize);
    // DOMContentLoaded->dom加载完就执行,onload要dom/css/js都加载完才执行
    //doc.addEventListener("DOMContentLoaded", reFontSize);
})(document, window);